package code08_三大特征.练习;

import java.util.Scanner;

public class ComputerTest {
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		
		System.out.print("请选择需要购买的机器（1.台式机 2.笔记本 3.PDA）：");
		int choice = input.nextInt();
		Computer computer = null;
		switch(choice) {
			case 1:
				computer = new Desktop("联想A12", "联想", "Intel XSCale", "3.5英寸", "金和田水冷机箱");
				break;
			case 2:
				computer = new NoteBook("联想A12", "联想", "Intel XSCale", "3.5英寸", "1300mAh锂电池");
				break;
			case 3:
				computer = new PDA("联想A12", "联想", "Intel XSCale", "3.5英寸", "1200mAh锂电池", "TFT触控式屏幕 ");
				break;
		}
		buy(computer);
	}
	
	
	public static void buy(Computer computer) {
		computer.show();
	}
	
}


